tension
.
You can define tension at any point of any segment. The general syntax is
z1..tension a and b..z2If a = b, we can simplify this to
z1..tension a..z2The simple case
z1..z2
is a shorthand for1
z1..tension 1..z2
In the next example, we will need some more definitions. You should already understand the first two lines. The next line defines some parameters which will be used later. Then we declare the array of paths to be drawn, the array of cnt and pen widths which are both numeric variables. Then we assign some values to them.
for
token and carries out the commands up to
endfor
for the specified values of the loop control
variable. In the firs loop, when k = 1, the inner loop defines
points
z20, z21,…, z32. The token shifted
means
that the point is shifted by the specified vector. The vectors
right
, left
, up
, down
, are the unit
vectors in the named direction. The token scaled
means
scaling (multiplication) of the vector. In the equations below it
defines the length of the vector.
The definition of paths (curves) end with cycle
. This means
that the curve is cyclical. If you say
draw z1..z2..z3..z1;the curve will most probably have a sharp edge at z1. You must say
draw z1..z2..z3..cycle;in order to make the curve smooth.
Now we draw the curves. Notice that we used zero widths for the first two characters in order to simplify overlapping (look how fig. was done).